package com.ruoyi.system.WebController;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.StandardDb15W;
import com.ruoyi.system.service.IStandardDb15WService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Zhangyuting
 * @Desctription: TODO
 * @Date: Created in 2025/5/27 22:44
 * @Version: 1.0
 */
@RestController
@RequestMapping("/byWeb/standardStruct")
public class WebByStandardStructController  extends BaseController {

    @Autowired
    private IStandardDb15WService standardDb15WService;

    /**
     * 查询standardStruct列表
     */
    @GetMapping("/list")
    public TableDataInfo list(StandardDb15W standardDb15W)
    {
        List<StandardDb15W> list = standardDb15WService.selectStandardDb15WList(standardDb15W);
        return getDataTable(list);
    }

    @GetMapping(value = "/getStructTree/{id}")
    public AjaxResult getStructTree(@PathVariable("id") String id)
    {
        return standardDb15WService.selectStandardDb15WByBIdTree(id);
    }


}
